package com.qth.valet.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qth.valet.common.utils.ResponseResult;
import com.qth.valet.entity.po.Driver;
import com.qth.valet.entity.po.Orders;
import com.qth.valet.entity.req.DriverFinishOrderReq;
import com.qth.valet.entity.vo.OrdersDetail;
import com.qth.valet.entity.vo.OrdersPending;

import java.util.List;

public interface OrdersService extends IService<Orders> {

    List<OrdersPending> getPendingOrder(Double longitude, Double latitude, int status);

    ResponseResult<Void> grabOrder(Integer driverId, String orderId);

    OrdersDetail getOrderDetail(String orderId);

    IPage<Orders> getAllOrder(Integer driverId, Page<Orders> page, Integer status);

    Orders getOrderById(String orderId);

    void publishOrder(Orders order);

    List<Orders> getAllPendingOrder();

    ResponseResult<Void> updateOrderSts(Orders orders);

    void driverFinishOrder(DriverFinishOrderReq req);

    void selectDriverBySchedule();

    Driver selectDriver(Orders order);

    List<Orders> checkDriverOnline(Integer driverId);

    void updatePayVersion(String orderId);
}
